package cn.ysnk.clz.interceptor.security.role;

public enum RoleEnum {
	ROLE_ADMIN("超级管理员"), ROLE_MANAGER("站点管理员"), ROLE_USER("普通用户");
	private String name;
	private RoleEnum(String name){
		this.name = name;
	}
	public String getName() {
		return name;
	}
	public void setName(String name) {
		this.name = name;
	}
	
	public static RoleEnum switch2RoleEnum(String roleName){
		RoleEnum[] enums = RoleEnum.values();
		for(RoleEnum e:enums){
			if(e.name().equals(roleName)){
				return e;
			}
		}
		return ROLE_USER;
	}
}
